package ch9.thread2;

public class TestThread2 {

	public static void main(String[] args) {
		PrintThread2 p = new PrintThread2("线程1");
		Thread t1 = new Thread(p);
		t1.setPriority(Thread.MAX_PRIORITY);

		Thread t2 = new Thread(new PrintThread2("线程2"));
		t2.setPriority(Thread.MIN_PRIORITY);

		Thread t3 = new Thread(new PrintThread2("线程3"));
		t3.setPriority(Thread.NORM_PRIORITY);
		t1.start();
		t2.start();
		t3.start();
		try {
			t1.join();
			t2.join();
			t3.join();
		} catch (InterruptedException e) {
			// TODO 自动生成的 catch 块
			e.printStackTrace();
		}

		System.out.println("主线程！！！！！！！！！！！！！！！！！");
	}

}
